package cn.zktr.Personnel.controllers.tanyali;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;

import cn.zktr.Personnel.model.service.tanyali.EmaTrtsService;

@Controller
public class EmaTrtsController {
	@Autowired
	private EmaTrtsService trtservice;
	
	/**
	 * @author 招聘结果传数据
	 *
	 */
	@RequestMapping("tyl/zhao-pin-jie-guo")	
	public void demo1() {}
	
	@RequestMapping("zpjieguo")
	@ResponseBody
	public Map<String,Object> SalaryAccounttable1(int page,int rows){
		Map<String,Object> map = new HashMap<>();
		map.put("total",trtservice.zpjieguoselect().size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray findAll=trtservice.zpjieguoselect();
		//页内容
		map.put("rows",findAll);
		return map;
	}
	 
	/**
	 * @author 培训结果传数据
	 *
	 */
	@RequestMapping("tyl/pei-xun-jie-guo")
	public void demo2() {}
	
	@RequestMapping("pxjieguo")
	@ResponseBody
	public Map<String,Object> SalaryAccounttable(int page,int rows){
		Map<String,Object> map = new HashMap<>();
		map.put("total",trtservice.pxjieguoselect().size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray findAll=trtservice.pxjieguoselect();
		//页内容
		map.put("rows",findAll);
		return map;
	}
	
	/**
	 * @author 招聘结果传数据
	 *
	 */
	@RequestMapping("tyl/sheng-zhi-jie-guo")
	public void demo3() {}
	
	@RequestMapping("szjieguo")
	@ResponseBody
	public Map<String,Object> SalaryAccounttable2(int page,int rows){
		Map<String,Object> map = new HashMap<>();
		map.put("total",trtservice.szjieguoselect().size());
		Page<Object> p=PageHelper.startPage(page,rows);
		JSONArray findAll=trtservice.szjieguoselect();
		//页内容
		map.put("rows",findAll);
		return map;
	}
}
